<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>02_JS运算符</title>
</head>
<body>
<script>
    console.log(6 / 3)
    console.log(3 / 2)
    console.log(3 > 10)//false
    console.log(3 > '10')//false
    //字符之间的比较比较字符编码，隐式的使用charCodeAt转为字符编码比较
    console.log('张' > '陈', '张'.charCodeAt(), '陈'.charCodeAt())//张 24352 陈 38472
    console.log('3'.charCodeAt())//51
    console.log('103'.charCodeAt(2))//51  charCodeAt默认查看字符串的第一个字符

    let a = 1;
    let b = true;
    //≠
    console.log(a == b)//松散比较运算符，true，1==1
    console.log(a === b)//严格比较运算符，false，先比较数据类型，number≠boolean
    let c = 0;
    console.log(c == 0 ? 'true' : 'false')
    console.log(c = 0 ? 'yes' : 'no');

</script>
</body>
</html>